package com.ruoyi.problem.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.problem.mapper.ProblemConsultMapper;
import com.ruoyi.problem.domain.ProblemConsult;
import com.ruoyi.problem.service.IProblemConsultService;

/**
 * 卡牌问题咨询Service业务层处理
 * 
 * @author DEREK
 * @date 2023-08-03
 */
@Service
public class ProblemConsultServiceImpl extends ServiceImpl<ProblemConsultMapper, ProblemConsult> implements IProblemConsultService 
{
    @Autowired
    private ProblemConsultMapper problemConsultMapper;

    /**
     * 查询卡牌问题咨询
     * 
     * @param id 卡牌问题咨询主键
     * @return 卡牌问题咨询
     */
    @Override
    public ProblemConsult selectProblemConsultById(Long id)
    {
        return problemConsultMapper.selectProblemConsultById(id);
    }

    /**
     * 查询卡牌问题咨询列表
     * 
     * @param problemConsult 卡牌问题咨询
     * @return 卡牌问题咨询
     */
    @Override
    public List<ProblemConsult> selectProblemConsultList(ProblemConsult problemConsult)
    {
        return problemConsultMapper.selectProblemConsultList(problemConsult);
    }

    /**
     * 新增卡牌问题咨询
     * 
     * @param problemConsult 卡牌问题咨询
     * @return 结果
     */
    @Override
    public int insertProblemConsult(ProblemConsult problemConsult)
    {
        problemConsult.setCreateTime(DateUtils.getNowDate());
        return problemConsultMapper.insertProblemConsult(problemConsult);
    }

    /**
     * 修改卡牌问题咨询
     * 
     * @param problemConsult 卡牌问题咨询
     * @return 结果
     */
    @Override
    public int updateProblemConsult(ProblemConsult problemConsult)
    {
        return problemConsultMapper.updateProblemConsult(problemConsult);
    }

    /**
     * 批量删除卡牌问题咨询
     * 
     * @param ids 需要删除的卡牌问题咨询主键
     * @return 结果
     */
    @Override
    public int deleteProblemConsultByIds(Long[] ids)
    {
        return problemConsultMapper.deleteProblemConsultByIds(ids);
    }

    /**
     * 删除卡牌问题咨询信息
     * 
     * @param id 卡牌问题咨询主键
     * @return 结果
     */
    @Override
    public int deleteProblemConsultById(Long id)
    {
        return problemConsultMapper.deleteProblemConsultById(id);
    }
}
